import ajax from './ajax'

let base = 'counties'

export default {
    // 全查,传递参数的时候需要写parmas
    selects: (params) => ajax.get(base + '/selects', { params }),
    // 通过县区名称查询
    dimSelectByName: (countiesName) => ajax.get(base + '/dim-select-by-name/' + countiesName),
    // 通过主键删除县区记录
    deleteByPrimary: (countiesId) => ajax.delete(base + "/" + countiesId),
    // 通过主键修改县区记录
    updateByPrimary: (counties) => ajax.put(base + '/update-by-primary', counties),
    // 添加县区记录
    insert: (counties) => ajax.post(base + '/insert', counties),
    // 通过主键查询
    selectByPrimary: (countiesId) => ajax.get(base + "/select-by-primary/" + countiesId),

    selectsAll:()=>ajax.get(base+"/selectsAll")
}